<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>hello_react</title>
</head>
<body>
<div id="test">

</div>
</body>
</html>

<!--引入react核心库-->
<script type="text/javascript" src="../Js/react.development.js"></script>
<!--引入react-dom库,用于支持react操作dom-->
<script type="text/javascript" src="../Js/react-dom.development.js"></script>


<script type="text/javascript">
// 创建虚拟DOM
// React.createElement(标签名,属性,内容)
// 一直嵌套，麻烦
const VDOM=React.createElement('h1',{},React.createElement('span',{id:'title'},'hello react'))

// 渲染虚拟DOM到页面
// ReactDOM.render(虚拟dom,容器)
ReactDOM.render(VDOM,document.getElementById("test"))
</script>